<script setup name="App" lang="ts">
import { reactive, Ref, ref } from 'vue';

/* const data = reactive({
  name: 'ifer',
  age: 18,
}) */

interface IPerson {
  name: string;
  age: string | number
}
// !第一种通过类型注解指定类型
/* const data: IPerson= reactive({
  name: 'ifer',
  age: 18,
}) */
// !第二种通过泛型函数
const data= reactive<IPerson>({
  name: 'ifer',
  age: 18,
})
</script>
<template>
  <div>name: {{ data.name }}</div>
</template>
